<template>
  <div>
    <el-container>
      <el-header>天气管理后台</el-header>
      <el-container>
        <el-main>
          <div id="box1">
            <h2>导航</h2>
            <el-button type="primary" @click="$router.push('/adminAfter/user')">用户管理</el-button>
            <el-button type="primary" @click="$router.push('/adminAfter/address')" style="margin-left:-1px">地区管理</el-button>
            <el-button @click="logout" type="success" style="margin-left:-1px">回到首页</el-button>
          </div>
          <router-view/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  mounted(){
    this.$router.push('/adminAfter/user')
  },
  methods:{
    logout(){
      this.$router.push('/')
      this.$router.go(0)
    }
  }
};
</script>

<style scoped>
 .el-header {
    background: linear-gradient(135deg, #89c4ff 0%, #a6d4fe 100%);
    color: #333;
    font-family: '微软雅黑';
    font-size: 25px;
    text-align: center;
    line-height: 60px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  }
  #box1{
    width: 150px;
    height: 400px;
    margin-top: 20px;
    
    position:  fixed;
    /* border: 1px solid black; */
    font-family: '微软雅黑';
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25);
  }
  
  #box1 h2 {
    color: #333;
    margin-bottom: 20px;
  }

  #box1 .el-button {
    width: 100%;
    margin: 10px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
  }

  #box1 .el-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }

  .el-main {
    background: linear-gradient(135deg, 
      rgba(137, 196, 255, 0.3) 0%, 
      rgba(166, 212, 254, 0.2) 100%
    );
    color: #333;
    text-align: center;
    min-height: calc(100vh - 60px);
    padding: 20px 20px 20px 190px;
  }
  
  body > .el-container {
    margin-bottom: 40px;
  }

  /* 美化表格样式 */
  .el-table {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(12px);
    border-radius: 15px;
    overflow: hidden;
    margin-top: 20px;
  }

  .el-table th {
    background-color: rgba(137, 196, 255, 0.1) !important;
    color: #333 !important;
  }

  .el-table td, .el-table th {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  /* 美化分页器 */
  .el-pagination {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    backdrop-filter: blur(12px);
  }
</style>